//调用接口配置文件
import { request } from 'config/request'
// 定义接口
export async function getArea(params) {
    return request({
        url: 'admin/qrcode/region/tree/get',
        method: 'GET',
        data: params,
    });
};
//获取渠道信息详情
export async function getDetail(params) {
    return request({
        url: `admin/qrcode/detail/get`,
        method: 'GET',
        data: params,
    });
};
//删除二维码
export async function deleteCode(params) {
    return request({
        url: `admin/qrcode/delete/${params.id}`,
        method: 'DELETE',
        // data: params,
    });
};
export async function downloadQrcode(params) {
    console.log(params.productId)
    return request({
        url: `admin/qrcode/download/times/count`,
        method: 'PUT',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
//城市与区域级联
export async function regionArea(params) {
    console.log(params)
    return request({
        url: `admin/qrcode/region/area/tree/get`,
        method: 'GET',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
//查询城市
export async function getProduct(params) {
    console.log(params)
    return request({
        url: `admin/qrcode/products/by-city`,
        method: 'GET',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};